# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.  So make sure this doesn't display
# anything or bad things will happen !


# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
	# Shell is non-interactive.  Be done now!
	return
fi

# Put your fun stuff here.
# global
SHELLRC="${HOME}/.shell"
source "${SHELLRC}/functions.sh"
source "${SHELLRC}/bootstrap.sh"
source "${SHELLRC}/external.sh"

# local 
[ -f "${SHELLRC}/external.local.sh" ] && source "${SHELLRC}/external.local.sh"
[ -f "${SHELLRC}/bootstrap.local.sh" ] && source "${SHELLRC}/bootstrap.local.sh"

source "${SHELLRC}/alias.sh"

# sheldon
SHELDON_BIN=`which sheldon`
[ -e $SHELDON_BIN ] && eval "$(sheldon source)"

# startship
STARTSHIP_BIN=`which starship`
[ -e $STARTSHIP_BIN ] && eval "$(starship init bash)"

# for conda
[ -e /opt/dev/utils/anaconda3/bin/conda ] && eval "$(/opt/dev/utils/anaconda3/bin/conda shell.bash hook)"
# for pipx
[ -e `which register-python-argcomplete` ] && [ -e `which pipx` ] && eval "$(register-python-argcomplete pipx)"

# fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash

# dircolor
DIRCOLORPATH=${HOME}/.dir_colors/dircolors
[ -f ${DIRCOLORPATH} ] && eval `dircolors ${DIRCOLORPATH}`
